﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Entries.aspx.cs" Inherits="BM.Tools.WebControls.MForm.BlogExample.Entries" Title="Untitled Page" %>

<%@ Register Assembly="BM.Tools.WebControls.MForm" Namespace="BM.Tools.WebControls.MForm.Controls"
    TagPrefix="mf" %>
<%@ Register TagPrefix="mf" TagName="BlogControl" Src="~/BlogControl.ascx" %>
    
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">        
    <asp:Button ID="Button1" PostBackUrl="~/BlogEntryCommandPage.aspx?command=EntryAdding" runat="server" Text="Create new entry" />
    <asp:Repeater runat="server" ID="blogEntriesRepeater" OnItemDataBound="BindBlogEntry" >
        <ItemTemplate>            
            <mf:BlogControl runat="server" ID="blogEntryControl" Mode="Viewing" />
            <asp:Button PostBackUrl='<%# string.Concat("BlogEntryCommandPage.aspx?index=", Container.ItemIndex, "&command=CommentAdding") %>' ID="CommentButton" runat="server" Text="Leave a comment" />
            <asp:Button PostBackUrl='<%# string.Concat("BlogEntryCommandPage.aspx?index=", Container.ItemIndex, "&command=EntryEditing") %>' ID="EditButton" runat="server" Text="Edit the entry" />
            <asp:Button PostBackUrl='<%# string.Concat("BlogEntryCommandPage.aspx?index=", Container.ItemIndex, "&command=CommentEditing") %>' ID="EditCommentsButton" runat="server" Text="Edit your comments" />
        </ItemTemplate>
    </asp:Repeater>        
</asp:Content>
